package com.zr.datamodel;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * 配送点实体
 * @author lym
 *
 */
@Entity
@Table(name="point")
public class PointDM {

	//配送点id
	private int id;
	
	//配送点名
	private String name;
	
	//内部结算价格
	private double insidePrice;
	
	//上行站点
	private String up_piont;
	
	//下行站点
	private String next_piont;
	
	//用户(配送点管理员)
	private UserDM user;
	
	//配送点价格
	private RangePriceDM pointPrice;
	
	//配送点所属地区
	private AreaDM area;
	private RangeDM range;

	@Id
	@GeneratedValue
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@Column(name="name")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name="inside_price")
	public double getInsidePrice() {
		return insidePrice;
	}

	public void setInsidePrice(double insidePrice) {
		this.insidePrice = insidePrice;
	}

	@Column(name="up_piont")
	public String getUp_piont() {
		return up_piont;
	}

	public void setUp_piont(String up_piont) {
		this.up_piont = up_piont;
	}

	@Column(name="next_piont")
	public String getNext_piont() {
		return next_piont;
	}

	public void setNext_piont(String next_piont) {
		this.next_piont = next_piont;
	}

	@ManyToOne
	public UserDM getUser() {
		return user;
	}

	public void setUser(UserDM user) {
		this.user = user;
	}
	@OneToOne
	public RangePriceDM getPointPrice() {
		return pointPrice;
	}
	
	public void setPointPrice(RangePriceDM pointPrice) {
		this.pointPrice = pointPrice;
	}
	@ManyToOne
	public AreaDM getArea() {
		return area;
	}

	public void setArea(AreaDM area) {
		this.area = area;
	}
	@OneToOne
	public RangeDM getRange() {
		return range;
	}

	public void setRange(RangeDM range) {
		this.range = range;
	}
	
}
